package cn.yll.api.order.service;

import cn.yll.api.order.request.CashOrderRequest;
import cn.yll.api.order.request.OrderRequest;
import cn.yll.api.order.response.OrderResponse;
import cn.yll.common.module.RestModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 商城订单接口服务
 * @author yangll
 */
@FeignClient(value = "shop-order", contextId = "orderFeinService", path = "/orders", fallbackFactory = RemoteOrderFeinServiceImpl.class)
public interface RemoteOrderFeinService {

    @PostMapping("createOrder")
    RestModel<OrderResponse> createOrder(@RequestBody OrderRequest request);

    @PostMapping("cashOrder")
    RestModel<?> cashOrder(@RequestBody CashOrderRequest request);
}
